﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Ccit.SysOrgan;

namespace Ccit.Mgoa.Collaboration
{
    public partial class collaboration_attach_view : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                hdCommentId.Value = (Request.QueryString["id"] != null) ? Request.QueryString["id"].ToString() : "";
                InitPage();
            }
        }

        private void InitPage()
        { 
            string sCommentId=hdCommentId.Value;
            if (sCommentId != "")
            { 
                CollaborateBLL oCollaborate=new CollaborateBLL();
                MsComment msComment = oCollaborate.GetCommentById(sCommentId);
                UserNET user = new UserNET(Convert.ToInt32(msComment.PublisherId));
                string sOrganName = user.belong.OrganName;
                string sDeptName = user.belong.DeptName;
                lblPublisherName.Text = msComment.PublisherName;
                lblBelongDept.Text = sDeptName;
                lblPublishDate.Text = msComment.PublishDate;
                tdCommentContent.InnerHtml = msComment.Content.Replace("\r\n", "<br/>");
                attach.ViewShow("0050", sCommentId);
            }
        }
    }
}
